import 'dart:io';

void main() {
  print('开始执行获取数据');
  final res = getOnlineData();

  print(res);
  res.then((news) =>{
    print(news),print('数据获取完毕')
  });
}
Future<String> getOnlineData() async {
  return Future((){
sleep(Duration(seconds: 4));
  return '获取数据成功';
  });

}
